<?php
/**
 * Created by PhpStorm.
 * User: idcu
 * Date: 2016/3/9
 * Time: 19:34
 */
namespace Service\Model;
use IDCU\Model\RelationModel;

class DeptModel extends RelationModel
{
//    protected $connection = array(
//        'db_type'       =>  'mysql',
//        'db_user'       =>  'zhkj_crm',
//        'db_pwd'        =>  'AdkdCGP7fHcjht5c',
//        'db_host'       =>  '192.168.0.196',
//        'db_port'       =>  '3306',
//        'db_name'       =>  'td_oa',
//        'db_charset'    =>  'utf8',
//    );
//
//    protected $tablePrefix = '';
    protected $tableName = 'oa_dept';

    public function getDept(){
        return $this->field('DEPT_ID,DEPT_NAME,DEPT_PARENT,DEPT_NO')->order('DEPT_NO')->select();
    }
}